package cn.edu.scau.cmi.zhuanglinting.simpleFactory;

public class PolicyProducer {
	public static AutoInsurance getPolicyObj(String option) {
		AutoInsurance policy = null;
		if(option.compareTo("bodyInjure") == 0) { policy = new BodyInjur();}
		else if(option.compareTo("collision") == 0) { policy = new Collision();}
		else if(option.compareTo("comprehensive") == 0) { policy = new Comprehensive();}
		else if(option.compareTo("personInjure") == 0) { policy = new PersonInjur();}
		else if(option.compareTo("property") == 0) { policy = new Property();}
		return policy;
	}
	
}
